package com.wuyoucar.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/*
订单表
 */
public class TOrder implements Serializable {
    private String ordernumber;//订单号主键
    private Integer userid;
    private String  vin ; // 车架号
    private String  carnumber;
    private String  cartype;
    private Integer orderstate;//订单状态
    private Date    ordertime;//下单时间
    private String  safestate;//保险类型
    private Date    paytime;//支付时间
    private String  insuredpersonname;//被保人名字
    private String  insuredpersonidnumber;//被保人身份证
    private String  carmastername;//车主名字
    private String  carmasteridnumber;//车主身份证
    private Integer auditerid;//审核者id 自动核保通过时为0
    private Date    lastmodifytime;
    private String  remark;//注释
    private String  checkstate; // 审核状态
    private TSafetype safetype;
    private TUserinfo userinfo;
    private Double price;//报价
    private Integer safetypeitemid;
    public TOrder() {
    }

    //新增订单的构造器
    public TOrder(String ordernumber, Integer userid, String vin, String carnumber, String cartype, Integer orderstate, Date ordertime, String safestate, String insuredpersonname, String insuredpersonidnumber, String carmastername, String carmasteridnumber, Integer auditerid, String remark, String checkstate, Double price,Integer safetypeitemid) {
        this.ordernumber = ordernumber;
        this.userid = userid;
        this.vin = vin;
        this.carnumber = carnumber;
        this.cartype = cartype;
        this.orderstate = orderstate;
        this.ordertime = ordertime;
        this.safestate = safestate;
        this.insuredpersonname = insuredpersonname;
        this.insuredpersonidnumber = insuredpersonidnumber;
        this.carmastername = carmastername;
        this.carmasteridnumber = carmasteridnumber;
        this.auditerid = auditerid;
        this.remark = remark;
        this.checkstate = checkstate;
        this.price = price;
        this.safetypeitemid = safetypeitemid;
    }

    public TOrder(String ordernumber, Integer userid, String vin,
                  String carnumber, String insuredpersonname,
                  String insuredpersonidnumber, String carmastername, String carmasteridnumber, Double price){
        this.ordernumber = ordernumber;
        this.userid = userid;
        this.vin = vin;
        this.carnumber = carnumber;
        this.insuredpersonname = insuredpersonname;
        this.insuredpersonidnumber = insuredpersonidnumber;
        this.carmastername = carmastername;
        this.carmasteridnumber = carmasteridnumber;
        this.price = price;
    }
   //支付订单成功后，要改变orderstate的状态
    public TOrder(String ordernumber,Integer orderstate,Date paytime,String remark){
        this.ordernumber=ordernumber;
        this.orderstate=orderstate;
        this.paytime=paytime;
        this.remark=remark;

    }

    public TOrder(String ordernumber, Integer userid, String vin, String carnumber,
                  String cartype, Integer orderstate, Date ordertime, String safestate,
                  Date paytime, String insuredpersonname, String insuredpersonidnumber,
                  String carmastername, String carmasteridnumber, Integer auditerid,
                  Date lastmodifytime, String remark, String checkstate,
                  TSafetype safetype) {
        this.ordernumber = ordernumber;
        this.userid = userid;
        this.vin = vin;
        this.carnumber = carnumber;
        this.cartype = cartype;
        this.orderstate = orderstate;
        this.ordertime = ordertime;
        this.safestate = safestate;
        this.paytime = paytime;
        this.insuredpersonname = insuredpersonname;
        this.insuredpersonidnumber = insuredpersonidnumber;
        this.carmastername = carmastername;
        this.carmasteridnumber = carmasteridnumber;
        this.auditerid = auditerid;
        this.lastmodifytime = lastmodifytime;
        this.remark = remark;
        this.checkstate = checkstate;
        this.safetype = safetype;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public TUserinfo getUserinfo() {
        return userinfo;
    }

    public void setUserinfo(TUserinfo userinfo) {
        this.userinfo = userinfo;
    }

    public String getOrdernumber() {
        return ordernumber;
    }

    public void setOrdernumber(String ordernumber) {
        this.ordernumber = ordernumber;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public String getVin() {
        return vin;
    }

    public void setVin(String vin) {
        this.vin = vin;
    }

    public String getCarnumber() {
        return carnumber;
    }

    public void setCarnumber(String carnumber) {
        this.carnumber = carnumber;
    }

    public String getCartype() {
        return cartype;
    }

    public void setCartype(String cartype) {
        this.cartype = cartype;
    }

    public Integer getOrderstate() {
        return orderstate;
    }

    public void setOrderstate(Integer orderstate) {
        this.orderstate = orderstate;
    }

    public Date getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(Date ordertime) {
        this.ordertime = ordertime;
    }

    public String getSafestate() {
        return safestate;
    }

    public void setSafestate(String safestate) {
        this.safestate = safestate;
    }

    public Date getPaytime() {
        return paytime;
    }

    public void setPaytime(Date paytime) {
        this.paytime = paytime;
    }

    public String getInsuredpersonname() {
        return insuredpersonname;
    }

    public void setInsuredpersonname(String insuredpersonname) {
        this.insuredpersonname = insuredpersonname;
    }

    public String getInsuredpersonidnumber() {
        return insuredpersonidnumber;
    }

    public void setInsuredpersonidnumber(String insuredpersonidnumber) {
        this.insuredpersonidnumber = insuredpersonidnumber;
    }

    public String getCarmastername() {
        return carmastername;
    }

    public void setCarmastername(String carmastername) {
        this.carmastername = carmastername;
    }

    public String getCarmasteridnumber() {
        return carmasteridnumber;
    }

    public void setCarmasteridnumber(String carmasteridnumber) {
        this.carmasteridnumber = carmasteridnumber;
    }

    public Integer getAuditerid() {
        return auditerid;
    }

    public void setAuditerid(Integer auditerid) {
        this.auditerid = auditerid;
    }

    public Date getLastmodifytime() {
        return lastmodifytime;
    }

    public void setLastmodifytime(Date lastmodifytime) {
        this.lastmodifytime = lastmodifytime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCheckstate() {
        return checkstate;
    }

    public void setCheckstate(String checkstate) {
        this.checkstate = checkstate;
    }

    public TSafetype getSafetype() {
        return safetype;
    }

    public void setSafetype(TSafetype safetype) {
        this.safetype = safetype;
    }

    @Override
    public String toString() {
        return "TOrder{" +
                "ordernumber='" + ordernumber + '\'' +
                ", userid=" + userid +
                ", vin='" + vin + '\'' +
                ", carnumber='" + carnumber + '\'' +
                ", cartype='" + cartype + '\'' +
                ", orderstate=" + orderstate +
                ", ordertime=" + ordertime +
                ", safestate='" + safestate + '\'' +
                ", paytime=" + paytime +
                ", insuredpersonname='" + insuredpersonname + '\'' +
                ", insuredpersonidnumber='" + insuredpersonidnumber + '\'' +
                ", carmastername='" + carmastername + '\'' +
                ", carmasteridnumber='" + carmasteridnumber + '\'' +
                ", auditerid=" + auditerid +
                ", lastmodifytime=" + lastmodifytime +
                ", remark='" + remark + '\'' +
                ", checkstate='" + checkstate + '\'' +
                ", safetype=" + safetype +
                '}';
    }
}
